﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};
	
	var purtype2Data = Jxstar.findComboData('purtype2');
	var auditData = Jxstar.findComboData('audit');
	var items = [{
		height: '97%',
		width: '97%',
		border: false,
		layout: 'form',
		style: 'padding:10px;',
		items: [{
			anchor:'100%',
			border: false,
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'trigger', fieldLabel:'采购单号', name:'pur_apply_bid__apply_code',
						anchor:'100%', triggerClass:'x-form-search-trigger',
						maxLength:20, allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', editable:false,
						onTriggerClick: function() {
							var selcfg = {pageType:'combogrid', nodeId:'pur_select', layoutPage:'', sourceField:';', targetField:';', whereSql:"(pur_apply.pur_type = 'zbgk' or pur_apply.pur_type = 'zbyq') and apply_status < '8'", whereValue:'', whereType:'', isSame:'1', isShowData:'1', isMoreSelect:'0',isReadonly:'1',fieldName:'pur_apply_bid.apply_code'};
							JxSelect.createSelectWin(selcfg, this, 'node_pur_apply_bid_form');
						}},
					{xtype:'textfield', fieldLabel:'采购单名称', name:'pur_apply_bid__apply_name', readOnly:true, anchor:'100%', maxLength:100},
					{xtype:'textfield', fieldLabel:'项目编号', name:'pur_apply_bid__project_code', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'项目名称', name:'pur_apply_bid__project_name', readOnly:true, anchor:'100%', maxLength:100},
					{xtype:'combo', fieldLabel:'采购方式', name:'pur_apply_bid__pur_type',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: purtype2Data
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: purtype2Data[0][0]},
					{xtype:'textfield', fieldLabel:'登记人', name:'pur_apply_bid__record_user', defaultval:'fun_getUserName()', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'存根编号', name:'pur_apply_bid__bid_code', anchor:'100%', maxLength:20},
					{xtype:'hidden', fieldLabel:'实施单位id', name:'pur_apply_bid__dept_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'采购单ID', name:'pur_apply_bid__apply_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'供应商ID', name:'pur_apply_bid__provider_id', anchor:'100%'}
				]
			},{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'combo', fieldLabel:'记录状态', name:'pur_apply_bid__auditing', defaultval:'0',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: auditData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: auditData[0][0]},
					{xtype:'textfield', fieldLabel:'实施单位', name:'pur_apply_bid__dept_name', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'trigger', fieldLabel:'中标单位名称', name:'pur_apply_bid__provider_name',
						anchor:'100%', triggerClass:'x-form-search-trigger',
						maxLength:50, allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', editable:false,
						onTriggerClick: function() {
							var selcfg = {pageType:'combogrid', nodeId:'provider_select', layoutPage:'', sourceField:'provider.provider_name;provider_id;', targetField:'pur_apply_bid.provider_name;provider_id;', whereSql:"manage_status = '20'", whereValue:'', whereType:'', isSame:'0', isShowData:'1', isMoreSelect:'0',isReadonly:'1',fieldName:'pur_apply_bid.provider_name'};
							JxSelect.createSelectWin(selcfg, this, 'node_pur_apply_bid_form');
						}},
					{xtype:'textfield', fieldLabel:'中标单位被授权代表', name:'pur_apply_bid__bid_user', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:50},
					{xtype:'numberfield', decimalPrecision:6, fieldLabel:'中标金额(万元)', name:'pur_apply_bid__bid_money', defaultval:'0', anchor:'100%', maxLength:12},
					{xtype:'datefield', fieldLabel:'通知日期', name:'pur_apply_bid__notice_date', defaultval:'fun_getToday()', format:'Y-m-d', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'项目ID', name:'pur_apply_bid__project_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'主键', name:'pur_apply_bid__bid_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'授权形式', name:'pur_apply_bid__auth_type', anchor:'100%'}
				]
			}
			]
		},{
			anchor:'100%',
			border: false,
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.99,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textarea', fieldLabel:'通知内容', name:'pur_apply_bid__bid_content', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', width:'100%', height:72, maxLength:500}
				]
			}
			]
		}]
	}];
	
	config.param = {
		items: items,
		funid: 'pur_apply_bid'
	};

	
	
	return new Jxstar.FormNode(config);
}